home *** CD-ROM | disk | FTP | other *** search
/ Belgian Amiga Club - ADF Collection / BS1 part 43.zip / Superbase pro no intro.adf / Readme!.doc < prev    next >
Text File  |  1988-03-18  |  58KB  |  1,485 lines

  1.                              README
  2.                              ======
  3.  
  4. This document contains information about a number of features in 
  5. Superbase Professional and the Forms Editor which could not be 
  6. fully described in the User Guides. 
  7.  
  8. If you have loaded the Readme file by clicking on its icon, you 
  9. can scroll down the document by pressing the space bar. If you 
  10. are in the Superbase Text Editor, use the down cursor key or the 
  11. scroll bars at the side of the window.
  12.  
  13. For a list of the topics covered in this document, see the README 
  14. CONTENTS on the next page down.
  15.  
  16.  
  17.  
  18.  
  19.  
  20.  
  21.  
  22.  
  23.                          README CONTENTS
  24.  
  25.      SUPERBASE PROFESSIONAL
  26.           Using Superbase Personal Files
  27.           Edit Form
  28.           Edit Form on the Amiga
  29.           Reorganize
  30.           Using the Lookup Function
  31.           Amiga Requester Default Keys
  32.           Keyboard Equivalents
  33.           New Editing Controls
  34.           The Current Record Button          
  35.           Passwords
  36.           Numeric Entry
  37.           Ram Disk Support (Amiga only)
  38.           Reserved Words
  39.           Graphics and Form Printing
  40.           Using Superbase as a Relational System
  41.           Further Rules for Constructing Queries
  42.           Superbase Start Options
  43.  
  44.      DATABASE MANAGEMENT LANGUAGE (DML)
  45.           Changes to DML
  46.           New Commands
  47.           User-defined Menus
  48.  
  49.      FORMS AND FORM HANDLING
  50.           Changing Text Fonts
  51.           Using External Files in a Form
  52.           The Amiga Colour Palette
  53.           Changing the Colour Pallette
  54.           Report Functions
  55.           Images
  56.  
  57.      FORM CALCULATIONS
  58.           Calculation Types
  59.           Calculation Prefixes
  60.  
  61.      MISCELLANEOUS
  62.  
  63.      FORTHCOMING FEATURES          
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.  
  71.                      SUPERBASE PROFESSIONAL
  72.  
  73. Using Superbase Personal Files
  74. ------------------------------
  75.  
  76. Superbase Personal is upwardly compatible with Superbase 
  77. Professional; so if you have upgraded from one to the other, you 
  78. can use any of the files that you created in Superbase Personal. 
  79. (It doesn't work the other way round: Professional files cannot 
  80. be loaded into Superbase Personal.)
  81.  
  82. However, there a number of differences in the way the two 
  83. programs store file data. You should take these into account when 
  84. you are loading Personal files into Professional. When you save 
  85. the files, Superbase Professional will automatically convert them 
  86. to its own format. But in some cases you may need to edit your 
  87. Personal files before you can use them. 
  88.  
  89. Here is a checklist of the points to bear in mind when converting 
  90. files from Personal to Professional:
  91.  
  92. *  Professional query files include the details of any database 
  93.    files associated with a query and these files are opened 
  94.    automatically when the query is loaded. If you use a Personal 
  95.    query in Professional, you will need to open the database 
  96.    files yourself before loading the query. Then save the query 
  97.    in order to convert it to the Superbase Professional query 
  98.    format.
  99.  
  100. *  Although Superbase Personal does not offer a Constant field 
  101.    type, it allows you to create a special type of calculation 
  102.    formula which acts like a constant formula. For example, if 
  103.    you define a single word formula such as "London" or TODAY it 
  104.    will have the same effect as the equivalent constant formula 
  105.    in Superbase Professional. When you load a Personal file into 
  106.    Professional, calculated fields will be defined as CLC RDO 
  107.    fields. If they were originally intended to act as constants, 
  108.    you should change the CLC attribute to CON by selecting Edit 
  109.    File and editing the file definition. You may also want to 
  110.    remove the Read Only attribute.
  111.  
  112. *  The list of words that are reserved for the use of the system 
  113.    is more extensive in Superbase Professional than in Superbase 
  114.    Personal (see the section on Reserved Words further on in this 
  115.    document). As a result, you may find that some of the field 
  116.    names in your Personal files are treated as reserved words in 
  117.    Superbase Professional. For example, Professional offers a 
  118.    large of number of new functions such as YEAR and HRS. If you 
  119.    have used YEAR as a field name, it would now become invalid. 
  120.    Before loading a Personal file, check that the field names are 
  121.    valid; if they are not, change them by editing the file 
  122.    definition. 
  123.  
  124.  
  125. Edit Form
  126. ---------
  127.  
  128. The Project menu option, Edit Form, runs the Forms Editor as an 
  129. additional task if it is not already in memory, provided there is 
  130. sufficient RAM capacity. If you have opened a form in Superbase, 
  131. you can use this option to edit it in the Forms Editor and then 
  132. return to Superbase. 
  133.  
  134. For Edit Form to work, Superbase must be able to locate the Forms 
  135. Editor program. First it looks for the program in the current 
  136. directory and then in the root directory of the current device. 
  137. If this fails, Superbase will look in the parameters directory as 
  138. specified in the Options dialog. If the Forms Editor still cannot 
  139. be found, Superbase will assume that it resides on a disk with 
  140. the volume name SBFORMED:. If this disk is not present in the 
  141. system, and you have not used the CLI ASSIGN command to specify 
  142. the location of SBFORMED:, then an AmigaDOS requester will prompt 
  143. you to insert it.
  144.  
  145. If the Forms Editor is already running when you select Edit Form, 
  146. then the Forms Editor window is pulled to the front and made 
  147. active. The current form in Superbase will also be selected for 
  148. editing. To Return to Superbase you can use the depth arrangement 
  149. gadget to push the Forms Editor screen to the back.
  150.  
  151.  
  152. Reorganize
  153. ----------
  154.  
  155. The primary application for Reorganize is as described in the 
  156. User Guide. It allows you to reclaim disk space after deleting 
  157. records from a file, and makes disk operations with the file more 
  158. efficient. 
  159.  
  160. This option can also be used to recover records after their data 
  161. has been corrupted; i.e., when an attempt to open a file produces 
  162. a disk error message. Reorganize steps over any errors it finds 
  163. in a file and retrieves as many valid records as it can. The 
  164. records which have been damaged will be lost when the new file is 
  165. created so Superbase informs the user with the message: "New file 
  166. has different record count".
  167.  
  168. There may also be circumstances in which Reorganize can be used 
  169. to recover data which could not be accessed before. For example, 
  170. if you turned off the computer after storing new records in Batch 
  171. mode, the details of these records would not be stored in the 
  172. file header. Reorganize rewrites the file header so that the 
  173. records are included in the new file. In this case, it issues 
  174. another error message (as well as the one above):
  175.  
  176. "Source file size incorrect in header".
  177.  
  178. Note that the manual suggests that the best way to recover data 
  179. from a disk error is to Export the remaining records and then 
  180. import them to a new file. This method has now been superseded by 
  181. Reorganize.
  182.  
  183.  
  184. Using the Lookup Function
  185. -------------------------
  186.  
  187. There are several points to note in connection with the LOOKUP 
  188. function:
  189.  
  190. *  When you are creating a validation formula (in a file 
  191.    definition) that uses LOOKUP, you should always enter the 
  192.    function's arguments by typing them into the box at the bottom 
  193.    of the validation dialog. In other words, even if your LOOKUP 
  194.    formula contains a field which is shown in the field list 
  195.    above, you should type the field name into the box instead of 
  196.    clicking on it.
  197.  
  198. *  It is important to include the file name as an extension to 
  199.    any field name used with LOOKUP. This applies to all fields 
  200.    irrespective of whether their names are unique to one file or 
  201.    not. For example:
  202.  
  203.       LOOKUP(Forename.Address,Firstname.Customers)
  204.  
  205.    is correct, while:
  206.  
  207.       LOOKUP(Forename,Firstname)
  208.  
  209.    may cause problems.
  210.  
  211. *  LOOKUP will not work correctly with date/time and numeric 
  212.    fields that have null values -- i.e., fields that have been 
  213.    left blank. If you wish to use LOOKUP on fields of this type 
  214.    you must force the first argument to give a null value when 
  215.    empty. For example LTRIM$(DATE$(date field)) will give a null 
  216.    string when the `date field' is empty.
  217.  
  218.  
  219. Amiga Requester Default Keys
  220. ----------------------------
  221.  
  222. Many of the dialogs in the Amiga version of Superbase accept 
  223. Return and Escape as keyboard equivalents to clicking on the OK 
  224. or Cancel buttons. Press the Return key to select OK, press the 
  225. Escape key for Cancel. In cases where a casual OK might be 
  226. destructive, Superbase does not allow the Return key equivalent.
  227.  
  228.  
  229. Keyboard Equivalents
  230. --------------------
  231.  
  232. In addition to the keyboard equivalents described in the User 
  233. Guide, Superbase also provides the following:
  234.  
  235. Alt/Amiga B          Toggles Bold (text style) on and off in the 
  236.                      Text Editor
  237. Alt/Amiga U          Toggles Underline on and off
  238. Alt/Amiga I          Toggles Italic on and off
  239. Alt/Amiga P          Toggles Plain on, bold, italic, and                      
  240.                      underline off
  241. Alt/Amiga B          Toggles Batch mode on and off (this option
  242.                      is only available when the database window 
  243.                      is active, otherwise Alt/Amiga B acts as a 
  244.                      keyboard equivalent for the Bold text style)
  245. Alt/Amiga A          Select the program command line window --                                           
  246.                      equivalent to selecting Command from the 
  247.                      Program menu.
  248.  
  249. Note that `Amiga' indicates the right Amiga key.
  250.  
  251. The keyboard equivalent for Set Paging, Alt/Amiga P, is no longer 
  252. available.
  253.  
  254.  
  255. New Editing Controls
  256. --------------------
  257.  
  258. Two new controls have now been provided to allow the user to copy 
  259. lines in the Program Editor and Text Editor. CTRL L is used to 
  260. select the line you wish to copy; move the cursor to any point on 
  261. the line and press CTRL L. CTRL R inserts a copy of the line that 
  262. has previously been selected with CTRL L; move the cursor to the 
  263. point in the program or document where the line is to be inserted 
  264. and press CTRL L. A copy of the line will then be inserted below the 
  265. cursor.
  266.  
  267.  
  268. Current Record Button
  269. ---------------------
  270.  
  271. By now you will have noticed that the current record button on 
  272. the Control panel does not agree with the illustration in the 
  273. User Guide on page 1-8. Whereas the guide shows a single triangle 
  274. (as in Superbase Personal), the program now has two triangles 
  275. pointing in opposite directions from each other. 
  276.  
  277. The reason for this is that, in Superbase Professional, the 
  278. button has two functions. As well as acting as the current record 
  279. button, it also allows you to change current page in a multi-page 
  280. form. In the first capacity, it is used to redisplay the current 
  281. record after the record data has been overwritten or removed from 
  282. the screen by some other action -- for example, by Status File. 
  283. As a page selector, the same button is used to select either the 
  284. next page or the previous page. Clicking on the right-hand 
  285. triangle displays the next page, clicking on the left-hand 
  286. triangle displays the previous page.
  287.  
  288.  
  289. Passwords
  290. ---------
  291.  
  292. In earlier versions of Superbase, passwords were shown on screen 
  293. in the Password dialog as you typed them in. Now, when you type 
  294. in a password in order to gain access to a file, the password is 
  295. not displayed in the Password dialog. 
  296.  
  297.  
  298. RAM disk support (Amiga)
  299. ------------------------
  300.  
  301. Normally if you wish to use the Amiga RAM disk within a program, 
  302. you need to copy data files into the RAM disk before running the 
  303. program. With Superbase Professional, this step is unnecessary. 
  304. You can load data into the RAM disk simply by using the drive 
  305. identifier RAM: when you open a Superbase file. If the file is 
  306. not already in the RAM disk, Superbase will copy it to the disk 
  307. from the current directory, and open it at the same time. 
  308.  
  309. Superbase also provides a similar service when you close the 
  310. file. It asks if you want the file to be copied back to the 
  311. current directory, i.e. to the floppy or hard disk it was 
  312. originally copied from. If you click on OK it does the job for 
  313. you. Should you click on CANCEL the file will not be copied back 
  314. and you will be asked if you want to erase the copy you have in 
  315. the RAM disk. Selecting CANCEL will leave the RAM copy intact. 
  316.  
  317. (Note that if you open an existing file on RAM disk which has not 
  318. been put there by Superbase then when you close that file 
  319. Superbase will not ask you if you wish to copy it back.)
  320.  
  321. As an example, suppose the Address file is stored on the disk in 
  322. drive DF1: and the current directory is DF1:. To open this file 
  323. from the RAM disk you would select the Open File option on the 
  324. Project menu and then enter:
  325.  
  326.    RAM:Address
  327.  
  328. You can now work on the file in the normal way -- retrieve data, 
  329. edit data, remove records, and so on -- with the advantage that 
  330. file operations using a RAM disk are much faster than they are on 
  331. a physical disk. Remember to close the file at the end of a 
  332. session so that any changes you have made can be saved 
  333. permanently in the directory from which it was copied. 
  334.  
  335. This feature also works with other Ram disk facilities where the 
  336. drive identifier is VD0: or VDK:.
  337.  
  338.  
  339. Reserved Words
  340. --------------
  341.  
  342. It should be emphasised that the reserved word list includes all 
  343. Superbase functions even though they are not listed in Appendix 
  344. C. You should bear this in mind when you are defining a file or 
  345. writing a program: many of the DML functions have names which you 
  346. might tempted to use as field or variable names, for example HRS, 
  347. DAY, MONTH, YEAR.
  348.  
  349. Note also the following keywords which should be added to the 
  350. list in Appendix C.
  351.  
  352.  
  353.    AS
  354.    BUFFERS
  355.    CALL
  356.    COPY
  357.    DISK
  358.    DISKSPACE
  359.    FIELDS
  360.    PAGING
  361.    RECORD
  362.    TABLE
  363.  
  364.  
  365. Graphics and Form Printing
  366. --------------------------
  367.  
  368. On the Amiga, Printer on the Set menu has been extended to 
  369. provide a graphics printing option for forms. Selecting this 
  370. option displays a sub-menu with two items, Draft and Graphics. 
  371. Draft works in the same way as is described in the User Guide, 
  372. Volume 1. When Draft is set, output that appears on screen is 
  373. sent to the printer as well; so if you select the next record in 
  374. the current file, its field data will be output to the printer. 
  375. If a form is in use all the text items will be printed as well as 
  376. the field data. If you wish to print the field data only then you 
  377. should set the Print Status of the text items to non-printing 
  378. within the Forms Editor.
  379.  
  380. The Graphics option can be used when you are displaying data with 
  381. a form. It prints all the graphic elements in the form -- lines, 
  382. boxes, areas, images, and so on -- together with all the data the 
  383. form displays. Data items are printed in the system font, text 
  384. items are printed in the fonts and point sizes which were set in 
  385. the Forms Editor. However, Superbase will also take into account 
  386. the Print Status of an item as set in the Forms Editor.
  387.  
  388. On a 512K Amiga, you will only be able to print four colour forms 
  389. in either draft or graphics modes.
  390.  
  391.  
  392. Using Superbase as a Relational System
  393. --------------------------------------
  394.  
  395. Although it is impossible to describe the principles of 
  396. relational database design in this document, most users will 
  397. benefit from an abbreviated account of some of the more important 
  398. facts.
  399.  
  400. When you are contemplating the basic design of a relational 
  401. database application, there are three key considerations:
  402.  
  403. 1.  Establishing relationships between files. Every pair of files 
  404.     between which there is to be a relationship must have a field 
  405.     in each file that will be used as the link between them. 
  406.     These fields should be designated as key fields, preferably 
  407.     with unique indexes.
  408.  
  409. 2.  Ensuring integrity of relational link data. At the data entry 
  410.     stage, what goes into the link fields described above must be 
  411.     carefully controlled. The aim is to ensure that, for example, 
  412.     an account code (usually a text field) is always entered in 
  413.     the same case in all files in which it is used. This is done 
  414.     by setting the text field attribute for each of the link 
  415.     fields to perform automatic case conversion to either upper 
  416.     or lower case; obviously the conversion must be the same for 
  417.     both fields. Validation formulas may also be necessary to 
  418.     check the pattern of what is entered, its length, or the 
  419.     range of acceptable values.
  420.  
  421.     The second control on data integrity is via the LOOKUP 
  422.     function. This enables the system to check what is entered 
  423.     into the link field in one file against what already exists 
  424.     in the link field in the other file. For example, you would 
  425.     always want to check that a product was in stock before 
  426.     accepting an order for it. The LOOKUP function is attached to 
  427.     the link field in the file definition as a validation 
  428.     formula. However, if you are using links as described in the 
  429.     next paragraph, you must ensure that none of your LOOKUP 
  430.     functions tries to check for a record that you are still in 
  431.     the process of creating!
  432.  
  433. 3.  Including links in a multi-file form. If you want to design 
  434.     forms which can retrieve data from more than one file, you 
  435.     must use the Set Link menu option in the Forms Editor to 
  436.     create the links between the files. In Set Link, you specify 
  437.     the link fields described above as the master (or primary) 
  438.     and secondary link fields.
  439.  
  440. At the other end of the application, you will want to retrieve 
  441. data from your relational system in the most convenient way. 
  442. There are a number of ways of doing this.
  443.  
  444. 1.  Browsing. Use a multi-file form with links set up as 
  445.     described above. The video buttons operate in the usual way, 
  446.     and you can switch files and indexes to vary the order of 
  447.     retrieval. The printer may be used to obtain draft or 
  448.     graphics hard copy.
  449.  
  450. 2.  Queries. The Process Query Edit menu option can be used to 
  451.     set up multi-file queries, which may be stored on disk. 
  452.     Output may include any fields from files between which a 
  453.     relation is specified in the Filter, and can be sorted as you 
  454.     wish. Report functions may be added, as well as limited 
  455.     formatting, but output is basically columnar and non-graphic.
  456.  
  457. 3.  Reports. Report programs may be generated automatically with 
  458.     the Forms Editor or written directly in the program editor 
  459.     (the Program Edit menu option). The forms editor allows for 
  460.     multi-line headings and footings, many levels of subtotalling 
  461.     and sorting, and full page field positioning, as well as 
  462.     offering many other features. Relations between files are 
  463.     derived from the links between files, so here again you must 
  464.     use the Set Link menu option before saving the report form. 
  465.     Output is non-graphic.
  466.  
  467.  
  468. Further Rules for Constructing Queries
  469. --------------------------------------
  470.  
  471. In multi-file queries, the user (especially the programmer) must 
  472. exercise extra care to ensure that the query is efficient. The 
  473. following rules should be observed:
  474.  
  475. 1.  Files are processed in the order in which they are mentioned 
  476.     in the WHERE statement (Query Filter Line). In some cases you 
  477.     will want to process the smallest file first, in some cases 
  478.     you won't. You may have to experiment to find the optimum 
  479.     query for a particular application.
  480.  
  481. 2.  Every file reference in the WHERE statement must be part of a 
  482.     chain. WHERE A=B AND B=C is acceptable, but WHERE A=B AND C=D 
  483.     is not. A simple rule of thumb is that there should always be 
  484.     one less join than the number of files in the query.
  485.  
  486.  
  487. Superbase Start Options
  488. -----------------------
  489.  
  490. When you run SBpro from the CLI, you can use the following 
  491. optional parameters:
  492.  
  493. SBpro [-c] [-r] [-fformname] [-p] [-s] [-z]
  494.  
  495. -c Selects custom screen
  496. -r Disables returns (chr$(13)) when writing to disk files
  497. -f Loads form at startup time
  498. -p Removes remote control panel
  499. -s Removes scroll bars from Superbase window
  500. -z removes sizing gadget and disable sizing
  501.  
  502. NOTE: Remember to set the stack to at least 8000 before running 
  503. Superbase from the CLI.
  504.  
  505. The start options are also available from the Workbench by setting 
  506. Tool Types in the Info for the SBpro icon as follows:
  507.  
  508. SCREEN=WORKBENCH                    Use Workbench        
  509. SCREEN=CUSTOM                       Use custom screen
  510. RETURN=ON                           Enable returns        
  511. RETURN=OFF                          Disable returns
  512. SYSTEM=NOPANEL|NOSCROLL|NOSIZE      Remove panel scroll bars and size gadget
  513.  
  514. You also may use any combination of the three options in the 
  515. SYSTEM item.
  516.  
  517. You can load a form at startup by creating an icon for it with the 
  518. default tool set to SBpro and then double clicking on it.
  519.  
  520.  
  521.  
  522.                DATABASE MANAGEMENT LANGUAGE (DML)
  523.  
  524. Changes to DML
  525. --------------
  526.  
  527. Programmers should be aware of the following changes, extensions 
  528. and undocumented features in Superbase's Database Management 
  529. Language:
  530.  
  531. 1.  The LOOKUP function is case sensitive -- for example, 
  532.     LOOKUP("fred",Firstname.Address) will not find an occurrence 
  533.     of "Fred".
  534.  
  535. 2.  The record SELECT commands (SELECT NEXT, SELECT LAST, SELECT 
  536.     KEY etc) have been amended so that they now take another 
  537.     optional parameter, FORM. The effect of this parameter is to 
  538.     activate any multi-file links that have been set in a form. 
  539.     If it is not used, the SELECT commands only operate on the 
  540.     current file and ignore any links between files.
  541.  
  542.     FORM must be placed immediately after SELECT. For example, 
  543.     with SELECT NEXT command, you would enter: SELECT FORM NEXT.
  544.  
  545. 3.  The KEY command now accepts a numeric key as well as a string 
  546.     key.
  547.  
  548. 4.  The commands EJECT, LOCATE, and FOOTING do not operate when 
  549.     the current output device is the screen and PAGING is OFF. 
  550.     You can, however, use LOCATE with paging off to set the 
  551.     column position -- but not the row position.
  552.  
  553. 5.  FORM. This command takes another optional parameter, SHOW, 
  554.     which is used to display external files. If the form contains 
  555.     external file fields, FORM SHOW is equivalent to clicking on 
  556.     the camera button. The syntax for FORM is:
  557.  
  558.        FORM [SHOW] [page [,row,column]]
  559.  
  560.     Note that the `page' parameter is now optional. When it is 
  561.     omitted and the FORM command is used without any following 
  562.     parameters, Superbase only displays the field data in a form 
  563.     and omits any other objects. 
  564.  
  565. 6.  The command SET BUFFERS only sets the size of the disk 
  566.     buffers for the current session. If you want to set the 
  567.     number of buffers to be saved with the parameters file 
  568.     (SB.PAR), use the new command SAVE SET.
  569.  
  570. 7.  SET TABLE/RECORD/FORM can be followed by the ON parameter. 
  571.     This switches to the specified view mode even if there is a 
  572.     form in memory. Normally SET TABLE, for example, acts as a 
  573.     toggle between Table view and the form. If Table view is the 
  574.     current view mode, this command would switch in the form. SET 
  575.     TABLE ON, however, would leave the current view mode as it 
  576.     is. The advantage of this option is that it enables the 
  577.     programmer to select a view mode without having to keep track 
  578.     of what the current mode is.
  579.  
  580. 8.  During the execution of a program, BREAK OFF disables the 
  581.     Stop button and CONTROL-C; also, you cannot use the space bar 
  582.     to pause during program execution. When the program has 
  583.     finished, BREAK is turned on again.
  584.  
  585. 9.  Apart from the Stop and Pause button, the remote control 
  586.     panel is disabled while a program is running. Stop is only 
  587.     disabled if the BREAK OFF command has been issued, Pause is 
  588.     available at all times.
  589.  
  590. 10. STORE takes another optional parameter, FORM. If FORM is used 
  591.     all the records in the current form are saved; otherwise 
  592.     STORE only saves the record which belongs to the current 
  593.     file. 
  594.  
  595.     The new syntax for this command is:
  596.  
  597.        STORE [,0/1/2] [FORM]/[FILE sbfname]
  598.  
  599.     Note that STORE ,2 secures not only the current file but 
  600.     also any other open files. It is therefore not necessary to 
  601.     follow it with the FORM or FILE parameters and, in fact, 
  602.     adding one of these parameters to STORE ,2 will cause an 
  603.     error.
  604.  
  605. 11. BLANK can also take FORM as an optional parameter. With a 
  606.     multi-file form, BLANK FORM creates blank records for each 
  607.     file represented in the form. When the FORM parameter is not 
  608.     included, BLANK only creates a blank record for the current 
  609.     file. 
  610.  
  611.     The syntax for this command is:
  612.  
  613.        BLANK [FORM]/[FILE sbfname]
  614.  
  615. 12. If SELECT DUPLICATE does not find a duplicate of the current 
  616.     index field, it leaves the current record unchanged.
  617.  
  618. 13. A string function should not contain more than one 
  619.     intermediate string concatenation. For example, 
  620.  
  621.        LEFT$("abcde",LEN("x" + "y")) 
  622.  
  623.     contains only one intermediate concatenation and gives the 
  624.     correct result, but
  625.  
  626.        LEFT$("ab" + "cde",LEN("x" + "y"))
  627.  
  628.     gives the wrong result because it contains two concatenations 
  629.     -- "ab" + "cde" and LEN("x" + "y").
  630.  
  631. 14. Superbase already provides you with equivalents for the 
  632.     system commands (or disk utilities) Delete, Rename and Copy. 
  633.     If you want to use some of the other disk utilities without 
  634.     switching screens or exiting from Superbase, you can do so 
  635.     with the CALL command. On the Amiga, you enter:
  636.  
  637.        CALL "NEWCLI" 
  638.  
  639.     This opens a CLI window on the Workbench screen, and you can 
  640.     then type in and execute any of the AmigaDOS commands. 
  641.     Alternatively, you can execute a DOS command directly without 
  642.     first typing it in the CLI window. Thus to list the directory 
  643.     for drive DF1: you would enter:
  644.  
  645.        CALL "DIR DF1:"
  646.  
  647.     The directory will then be output in either the CLI window 
  648.     used to run Superbase or the small Superbase window opened on 
  649.     the Workbench screen.
  650.  
  651.     You may want to use CALL to run a program which requires 
  652.     input from the keyboard. In this case, you should follow the 
  653.     program file name with the `<*' parameter, as in:
  654.  
  655.       CALL "fcopy <*"
  656.  
  657.     The effect of this parameter is to redirect input from 
  658.     `stdin', allowing you to type in data from the CLI window. 
  659.  
  660. 15. With commands that set a single file filter using WHERE (for 
  661.     example, IMPORT, EXPORT and SELECT WHERE) you can include ASK 
  662.     as the parameter to the WHERE statement. The effect of ASK is 
  663.     to display the standard filter dialog when the command is 
  664.     executed, thus allowing the user to set a filter while a 
  665.     program is running. If a filter is present when ASK is 
  666.     executed, the filter expressions will be presented as a 
  667.     default for the dialog.
  668.  
  669.     Examples are:
  670.  
  671.        SELECT WHERE ASK 
  672.  
  673.     In this example, ASK causes the filter dialog to be 
  674.     presented. Entering the following filter line (at run-time):
  675.  
  676.        Lastname LIKE "[r-z]*" 
  677.  
  678.     would have the same effect as executing the command:
  679.  
  680.        SELECT WHERE Lastname LIKE "[r-z]*"
  681.  
  682.     However, a partial filter like this is not allowed:
  683.  
  684.        SELECT WHERE datefield > ASK
  685.  
  686. 16. ENTER. The parameters for this command can only be used with 
  687.     a form. With other view modes, ENTER (on its own) places the 
  688.     data entry cursor in the first open field that is not Read 
  689.     Only.
  690.     
  691. 17. REQUEST. There is now an additional dialog type with the 
  692.     dialog number 19. This displays a list of the forms in the 
  693.     current directory. Note that the description in the DML User 
  694.     Guide for dialog type 5 is incorrect. This dialog provides a 
  695.     list of the fields in the current file. 
  696.  
  697. 18. SHOW. The command now takes an optional extension to allow or 
  698.     remove the menu bar from the EFMS screen: 
  699.  
  700.       SHOW [MENU ON/OFF] [field]/[strexpr]
  701.  
  702. 19. ? QUERY. The syntax for this command has been extended to 
  703.     make it easier to select a device for output. It is no longer 
  704.     necessary to select an output device before executing ? 
  705.     QUERY. Instead you should specify the device using the TO 
  706.     parameter. The new syntax is:
  707.  
  708.       ? QUERY [TO device]
  709.       
  710.     where `device' can be the printer, an ASCII file or a 
  711.     new `.sbf' file. If this parameter is not included 
  712.     output is to the screen. The device options are:
  713.  
  714.       TO PRINTER
  715.  
  716.     Outputs to the printer.
  717.  
  718.       TO FILE filename
  719.  
  720.     Creates an `.sbf' file on disk under the file name 
  721.     specified.
  722.  
  723.       TO filename
  724.  
  725.     Outputs to the ASCII file specified by `filename'.
  726.  
  727. 19. IF THEN ELSE. The explanation of block IF THEN statements 
  728.     given in the manual needs to be supplemented by two further 
  729.     points:
  730.  
  731.     *  Every block IF THEN statement must end with an END IF 
  732.        statement. (Example 4 on page 5-69, Volume 2, requires a 
  733.        second END IF after the last line.)
  734.  
  735.     *  Within a block IF THEN statement, you can insert one or 
  736.        more ELSE IF statements. These are used to extend the 
  737.        number of alternatives provided by the original block IF 
  738.        THEN (so that it has the same effect as the CASE statement 
  739.        found in some versions of Basic); but they do not require 
  740.        additional END IF statements.
  741.  
  742.     The following examples should make these points clear:
  743.  
  744.       IF a% THEN
  745.       ? atrue$
  746.       IF b% THEN
  747.       ? btrue$
  748.       ELSE
  749.       ? bfalse$
  750.       END IF
  751.       ELSE
  752.       ? afalse$
  753.       END IF    
  754.  
  755.       IF a% =1 THEN 
  756.       ? "one"
  757.       ELSE IF a% = 2 THEN
  758.       ? "two"
  759.       ELSE IF a% = 3 THEN
  760.       ? "three"
  761.       ELSE 
  762.       ? "Not 1 to 3"
  763.       END IF
  764.  
  765.  
  766. New DML Commands
  767. ----------------
  768.  
  769. 1.  SET PG
  770.     Use this command to set the page size on your printer. It 
  771.     takes the syntax:
  772.  
  773.        [SET] PG rows [,columns [,ss]]
  774.  
  775.     where rows specifies the number of rows on the page and 
  776.     column specifies the number of columns (the page width). ss 
  777.     stands for single sheet and takes a value of 0 or 1. 0 
  778.     specifies that single sheet paper is used, 0 specifies 
  779.     continuous stationery, also known as fan-fold paper. SET is 
  780.     optional.
  781.  
  782.     An example of the use of SET PG would be:
  783.  
  784.        SET PG 50, 65, 1
  785.  
  786.     This line sets the format for a printed page to 50 lines of 
  787.     no more than 65 characters. It also tells Superbase that the 
  788.     printer takes continuous stationery.
  789.  
  790.     You can use this command in a program or from the command 
  791.     line to customize a page for any kind of printed output -- 
  792.     whether you are printing a text file, record data or a 
  793.     report. However setting up the printer in Preferences on the 
  794.     Amiga will override the PG settings.
  795.  
  796. 2.  SET PRINTER ON [,0/1] / OFF
  797.     This is the program equivalent of selecting Print on the Set 
  798.     menu. The 0 parameter specifies draft mode printing, and the 
  799.     1 parameter specifies graphics mode printing. Use this 
  800.     command in conjunction with FORM to obtain form printouts. 
  801.     After SET PRINTER ON has been executed, any output to the 
  802.     screen will also be sent to the printer, so remember to SET 
  803.     PRINTER OFF when the print operation is complete.
  804.  
  805. 3.  SAVE SET
  806.     This command saves the Superbase parameter file. It is 
  807.     equivalent to clicking on OK in the Options dialog. All the 
  808.     parameters that have set in the dialog (and those that are 
  809.     set elsewhere) will be saved on disk in the file SB.par.
  810.  
  811. 4.  SET MIN
  812.     This command sets the minimum size allowed for the Superbase 
  813.     window. It takes two optional parameters, the minimum width 
  814.     and height of the window in pixels, so the full syntax is:
  815.  
  816.       SET MIN [width [,height]]
  817.  
  818.     Maximum width is 640, maximum depth is 183. SET MIN without 
  819.     parameters allows the programmer to lock the window to its 
  820.     current size while a program is running. You cannot use SET 
  821.     MIN to set the window larger than its size when the command 
  822.     is executed. SET MIN can also be executed from the command 
  823.     line or a function key.
  824.  
  825.  
  826. User-Defined Menus
  827. ------------------
  828.  
  829. On Gem versions of Superbase, you can define up to six menus and 
  830. each can have up to eight items (not including item 0 which 
  831. specifies the menu title). The figures given in the User Guide -- 
  832. 10 menus with 12 items -- only apply to the Amiga. A menu item 
  833. can have a maximum of 23 characters.
  834.  
  835. Other points to note in connection with the commands MENU and 
  836. MENU ON are:
  837.  
  838. *   The first item defines the width of a menu in terms of the 
  839.     number of characters. When you define the text string 
  840.     parameter for item 1 you may need to allow for the width of 
  841.     other items in the menu by adding spaces to the end of the 
  842.     string.
  843.  
  844. *   If you wish to use checkmarks in your menus, remember to 
  845.     leave a space for the checkmark character when you define the 
  846.     MENU text string -- the first character in the string should 
  847.     be a space.
  848.  
  849. *   MENU on its own clears all the menu settings (as do ERASE and 
  850.     CLEAR).
  851.  
  852. *   After the MENU ON command has been executed, any menus that 
  853.     have been defined remain active until an item has been 
  854.     selected. The program example on page 5-91 of the DML User 
  855.     Guide is slightly misleading on this point since it suggests 
  856.     that the MENU ON command needs to be executed repeatedly. A 
  857.     better way of checking whether an item has been selected 
  858.     would be:
  859.  
  860.       MENU ON a%,b%
  861.       menuloop: 
  862.       ON a% GOSUB sub1, sub2, sub3
  863.       GOTO menuloop
  864.  
  865.     Note, however, that the MENU ON command should be executed 
  866.     again after an item has been selected in order to reset the 
  867.     menu variables to 0. 
  868.  
  869.  
  870.  
  871.                      FORMS AND FORM HANDLING
  872.  
  873. Changing Text Fonts
  874. -------------------
  875.  
  876. Contrary to what is stated in the Forms Editor User Guide, text 
  877. fonts can be altered without deleting the text and typing it in 
  878. again. In fact, the text font can be treated in the same way as 
  879. the text style, as one of the text object's attributes.
  880.  
  881. To change the font, first select the object by double clicking on 
  882. it; then select the new font from the Fonts menu.
  883.  
  884.  
  885. Using External Files in a Form
  886. ------------------------------
  887.  
  888. You can use external file fields in a form in the same way as you 
  889. do in a database file. The difference is that the external files 
  890. are displayed in the field boxes rather than in a separate 
  891. window. This means that multiple external files can be displayed 
  892. at the same time. 
  893.  
  894. When you load the form into Superbase, the box for an external 
  895. field will show the data in the current record; i.e., the name of 
  896. an external file. To display the file in the box, click on the 
  897. camera button. If a box which contains an image file extends 
  898. beyond the screen, Superbase will move the form so that it shows 
  899. as much of the image or text as possible.
  900.  
  901. The result of entering a box -- by clicking on it, or by pressing 
  902. Return after editing the previous field in the field order -- 
  903. differs according to whether it contains a text file or an image 
  904. file. If you enter a text box, Superbase replaces the box with 
  905. the Text Editor window (which is given the same dimensions as the 
  906. box). You can then edit the text in the normal way. Closing the 
  907. Text Editor window or clicking in another part of the screen, 
  908. restores the text to the field box, and moves on to the next 
  909. field.
  910.  
  911. With images, the effect of entering an external field box is to 
  912. activate the image colour map: the image is displayed in its 
  913. original colours. Otherwise, the image is displayed in the 
  914. default colours of the form.
  915.  
  916. These facilities for showing text and images in external field 
  917. boxes only operate if the box is more than one character deep. 
  918. For this reason, the first thing you should do after placing an 
  919. external field on a form (in the Forms Editor) is resize it. 
  920.  
  921.  
  922. Amiga Colour Palette
  923. --------------------
  924.  
  925. On the Amiga, the Colour Palette option (in the Attributes 
  926. window) has been altered to reflect this computer's special 
  927. colour features. The Palette now works in the same way as the 
  928. Preferences colour changing option. It also offers several extra 
  929. facilities not available in Preferences or in Gem versions of the 
  930. Forms Editor.
  931.  
  932. You may find it helpful to read the section on page 3-9 of the 
  933. Forms Editor Guide as an introduction to the ideas underlying 
  934. this feature, but for detailed instructions on how to use the 
  935. palette you should consult the next section. 
  936.  
  937.  
  938. Changing the Colour Palette (Amiga only)
  939. ----------------------------------------
  940.  
  941. When you click on the Colour Palette icon in the Attributes 
  942. window, the Forms Editor will present you with the Colour 
  943. Selection dialog (requester). At the top, there are three sliders 
  944. for defining a colour in terms of its RGB (Red, Green and Blue) 
  945. values and a box showing the currently selected colour. The set 
  946. of colours available to you is shown below in the same format as 
  947. in the Attributes window -- as two rows of eight colours. If you 
  948. have previously set the resolution to 4 or 8 colours (see page. 
  949. 2-11, Forms Editor User Guide), only the first 4 or 8 colours 
  950. will be available and the rest of them will be ghosted. 
  951.  
  952. To change one of the colours in the Palette, first select it by 
  953. clicking on its box in the colour panel. The Forms Editor will 
  954. then do two things: it will display the colour in the box at the 
  955. top left-hand corner of the Colour Selection, and it will reset 
  956. the sliders to reflect the RGB values for the colour you have 
  957. selected. You can now change the colour by moving the sliders in 
  958. the same way as you would if you were using Preferences. When you 
  959. have finished, click on OK to return to the current Forms Editor 
  960. page.
  961.  
  962. By using this technique, you could define all the colours in the 
  963. Palette, setting the RGB values for each of them in turn. The 
  964. Forms Editor also provides several other options which allow you 
  965. to change a number of colours at a time. These options are 
  966. indicated by the buttons below the colour panel.
  967.  
  968. The Copy button enables you to copy a colour from one box to 
  969. another. The procedure is as follows: first, click on the colour 
  970. you wish to copy; second, click on the Copy button; third, click 
  971. on the target colour to which the first colour is to be copied.
  972.  
  973. With the Range button you specify the two colours at either end 
  974. of the range and the Forms Editor then adjusts the colours in 
  975. between. If you specified white and dark blue, for example, the 
  976. colours in between would be changed to shades of blue from light 
  977. to dark.
  978.  
  979. To set a colour range, click on the colour which is to form the 
  980. starting point (or the end point) for the range, click on the 
  981. Range button, then click on the colour at the other end of the 
  982. range. 
  983.  
  984. The Read Prefs button at the right of the colour panel changes 
  985. the first four colour boxes to the colours that have been set in 
  986. Preferences. The Reset button reverses the effects of any changes 
  987. you may have made and restores the colours that were set before 
  988. you selected the Colour Palette.
  989.  
  990.  
  991. Report Functions
  992. -------------------
  993.  
  994. Apart from COUNT the report functions -- SUM, MIN, MAX, MEAN, VAR 
  995. and S.D. -- can only be used with numeric fields. These functions 
  996. operate either on all the records in a group (if used in an AFTER 
  997. GROUP section) or on all the records in the report (in an AFTER 
  998. REPORT section).
  999.  
  1000. SUM
  1001. Gives the field total for all the records in a group or report.
  1002.  
  1003. MIN
  1004. Returns the minimum value of the specified field among the 
  1005. records in a group or the report.
  1006.  
  1007. COUNT
  1008. Returns the number of records in a group or the report. Unlike 
  1009. the other functions, COUNT should not be followed by a field name 
  1010. -- it operates on the field specified in the REPORT or GROUP box.
  1011.  
  1012. MAX
  1013. Returns the maximum value of the specified field among the 
  1014. records in a group or for the report.
  1015.  
  1016. MEAN
  1017. Returns the average value of the field data in a group or in the 
  1018. whole report.
  1019.  
  1020. VAR (Variance)
  1021. Provides a measure of the spread of the data from its mean.
  1022.  
  1023. S.D. (Standard Deviation)
  1024. Provides a measure of the spread of the data from its mean -- for 
  1025. the field data in a group or over the entire report.
  1026.  
  1027.  
  1028. Amiga Images
  1029. ------------
  1030.  
  1031. When you add an image to the page, the Amiga version of the Forms 
  1032. Editor gives you a choice over the colours the image takes. A 
  1033. dialog appears with the message:
  1034.  
  1035.      Use image colour map?
  1036.  
  1037. Clicking on OK selects the image colour map and resets the colour 
  1038. palette to those colours. If you click on Cancel, the image will 
  1039. be displayed using current range of colours as shown in the 
  1040. Attributes window. The form designer should ensure that only 
  1041. images compatible with the resolution and colour of the form are 
  1042. used.
  1043.  
  1044.  
  1045.  
  1046.                         FORM CALCULATIONS
  1047.  
  1048. Calculation  Types
  1049. -----------------
  1050.  
  1051. The calculations you add to a form have a number of features 
  1052. which are not covered in the Forms Editor guide (you should 
  1053. ignore the calculation examples given in the guide). In fact, 
  1054. with forms that are designed to be used in Superbase, 
  1055. calculations can play a far more important role than is suggested 
  1056. in the guide. This section describes these features in detail.
  1057.  
  1058. Calculations take the same names as DML variables. If they are 
  1059. intended to store string data, the last character must be `$'; if 
  1060. they are used to store numeric data, the last character must be 
  1061. `%'.  Calculations referred to by another calculation must 
  1062. already have been added to the form.
  1063.  
  1064. When you create a calculation, you will be presented with a 
  1065. calculation dialog where you enter the formula for the 
  1066. calculation. Initially, it will show a list of the fields in the 
  1067. current file which have been added to the form. If you want to
  1068. refer to other calculations in the formula, click on the multi-
  1069. file gadget. The calculation names will then be listed as if they 
  1070. were fields belonging to a file called FORMCALCS. 
  1071.  
  1072. There are four different types of form calculation, and each has 
  1073. its own syntax.
  1074.  
  1075. 1.  Blank calculations. These are calculations which do not have 
  1076.     a formula attached to them. They provide a means of 
  1077.     interacting with a form from a program and can be treated as 
  1078.     program variables.
  1079.  
  1080.     To define a calculation of this type, first enter its name 
  1081.     and then, without entering a formula, click on OK in the 
  1082.     formula dialog. Once the form has been loaded into Superbase, 
  1083.     the calculation can be used as a link between the form and a 
  1084.     program. This works both ways: you can assign a value to a 
  1085.     calculation-variable either by typing it in the calculation's 
  1086.     box on the form or by executing an assignment statement in a 
  1087.     program. 
  1088.  
  1089.     Suppose, for example, you defined a blank calculation with 
  1090.     the name fred%. In the form's field order fred% is number 5. 
  1091.     If you wanted to input data to a program from the form which 
  1092.     contains fred%, you would include the program line:
  1093.  
  1094.        ENTER 5
  1095.  
  1096.     When this line is executed, the input cursor will appear on 
  1097.     screen in the box belonging to fred% and the value entered by 
  1098.     the user will be assigned to fred%. If you now executed the 
  1099.     Memory command, fred% and its contents will be listed along 
  1100.     with all the other program variables. And any other DML 
  1101.     commands which operate on variables, such as CLEAR, will also 
  1102.     work with a calculation variable.
  1103.  
  1104.     To assign the value 22.5 to fred% from within the program, 
  1105.     you would execute the statement:
  1106.  
  1107.        fred% = 22.5
  1108.  
  1109.     This value will then be shown in the calculation box when the 
  1110.     form display is next updated. 
  1111.  
  1112.     Note that ENTER is the only input command that can be used 
  1113.     with a form. Forms are object oriented rather than character 
  1114.     oriented so you cannot use ASK or GET in combination with 
  1115.     LOCATE. Another point to note is that you can only identify a 
  1116.     calculation by its field order number; a command such as:
  1117.  
  1118.      ENTER fred% 
  1119.  
  1120.     will not work.
  1121.  
  1122. 2.  Standard calculations. These function in the same way as the 
  1123.     calculations which are attached to fields, and they take 
  1124.     exactly the same syntax. In fact, they can be regarded as a 
  1125.     special kind of field which only exists on a form.
  1126.  
  1127.     The calculation name should not occur in the calculation 
  1128.     formula unless it is a self-referencing calculation. Instead 
  1129.     the result is automatically assigned to the calculation when 
  1130.     the formula is performed; that is, after each of these 
  1131.     events:
  1132.  
  1133.     * Saving a record
  1134.     * Moving the cursor through the calculation box
  1135.     * Clicking in the calculation box
  1136.     * Retrieving another record, e.g. by clicking on the Next 
  1137.       Record button or with the command SELECT NEXT 
  1138.     * When you press Return after entering data in the box (only 
  1139.       possible if the calculation is not Read Only)
  1140.  
  1141.     Typically, this type of calculation is used to derive a total 
  1142.     from the contents of other calculations or fields and then to 
  1143.     display it on the form. Another application would be to 
  1144.     display a date by using the keyword TODAY in the formula. 
  1145.     Examples are:
  1146.  
  1147.       Calculation name         Calculation formula
  1148.  
  1149.       subtot1%                 Quantity * Price
  1150.       name$                    Left$(Firstname,1) + ". " + Lastname
  1151.       When$                    TODAY
  1152.  
  1153.     If you want to create a self-referencing calculation (see 
  1154.     Self-referencing Formulas, Chapter 2, Volume 1), you need to 
  1155.     add the calculation to the page and then edit it.
  1156.  
  1157. 3.  LET calculations. The formula for this type of calculation 
  1158.     must start with an assignment statement with LET as the first 
  1159.     word. It is used to assign a calculated value to a field or 
  1160.     another calculation. The field may belong to the current file 
  1161.     or another open file. 
  1162.  
  1163.     An example would be:
  1164.  
  1165.       LET Amount.invoice = quantity * cost
  1166.  
  1167.     where this formula is attached to the calculation fred%.
  1168.  
  1169.     Quantity times Cost will be evaluated in the same 
  1170.     circumstances as for type 2 calculations and the result will 
  1171.     displayed on screen in the calculation box belonging to 
  1172.     fred%.
  1173.  
  1174.     When a new record is retrieved, things happen slightly 
  1175.     differently. The right-hand part of the formula is evaluated 
  1176.     and displayed, but the value is not assigned to the field 
  1177.     named to the left of the equals sign.
  1178.  
  1179.     As with the other types of calculation, the result determines 
  1180.     whether the calculation should be defined as a string or 
  1181.     numeric variable; i.e. for a string result, the calculation 
  1182.     name must end with the `$' character; for a numeric result, 
  1183.     the name must end with the `%' character.
  1184.  
  1185.     If you are using a LET calculation to send or `post' data to 
  1186.     a record in another file, remember to save the record after 
  1187.     completing a task. 
  1188.  
  1189. 4.  Executable calculations. These calculations contain program 
  1190.     statements which are executed when the user passes through 
  1191.     the calculation box or clicks on it.
  1192.  
  1193.     A calculation of this type must begin with a DML command as 
  1194.     opposed to the name of a variable, field or calculation. But, 
  1195.     to distinguish it from other types of calculations, the 
  1196.     command word should not be LET, AFTER or POST.
  1197.  
  1198.     Apart from this, executable commands follow the same rules as 
  1199.     for command line statements. Almost any single or multi-
  1200.     statement DML program line can be entered as an executable 
  1201.     calculation. This provides immense scope for creating 
  1202.     powerful forms with their own built-in processing facility.
  1203.  
  1204.     At the simplest level, you could use an executable 
  1205.     calculation to assign strings to function keys for use in 
  1206.     data entry. For example:
  1207.  
  1208.       Key 1, "London": Key 2, "New York": Key 3, "Paris": Key 4, ...
  1209.  
  1210.     More complex applications include running a program, 
  1211.     executing another calculation, etc.
  1212.  
  1213.     You can even use the calculation itself as a variable into 
  1214.     which the user can enter a value. Thus the following command 
  1215.     string could be assigned to the calculation f$:
  1216.  
  1217.       IF f$ = "A" THEN .....  ELSE .....
  1218.  
  1219.     To force a calculation, make it Read Only and next in order.
  1220.  
  1221.     You can only make a calculation self-referencing by creating 
  1222.     then editing it.
  1223.  
  1224.  
  1225. Calculation Prefixes
  1226. --------------------
  1227.  
  1228. In addition to the four calculation types, there are two 
  1229. prefixes, AFTER and POST, which can be placed in front of the 
  1230. formulas for types 2 and 3.
  1231.  
  1232. AFTER 
  1233. The purpose of AFTER is to force a formula to be performed more 
  1234. frequently than it would be normally. It is followed by an 
  1235. optional field name and is separated from the rest of the formula 
  1236. by a colon. For example:
  1237.  
  1238.     AFTER : Quantity * Price
  1239.  
  1240. Here AFTER forces the formula to be performed whenever any event 
  1241. occurs on the form -- if you click on or pass through a field, 
  1242. when you select a new record, and when the form is saved. In the 
  1243. example above, if the formula was attached to the calculation 
  1244. aa1%, the result would be displayed in aa1%'s box every time the 
  1245. user clicked the mouse in the box or in any other box on the form.
  1246.  
  1247. If a field name is supplied, AFTER only takes effect after an 
  1248. event relating to the field specified. In the example below, 
  1249. we'll assume the formula is attached to the calculation Tot1%:
  1250.  
  1251.      AFTER Item: Subtot1% * 1.15
  1252.  
  1253. Tot1% will be assigned the result of the formula `Subtot1% * 
  1254. 1.15' after each of these events:
  1255.  
  1256. *  the cursor passes through the Item field
  1257. *  the user clicks in the Item box 
  1258. *  the value of Item changes
  1259. *  all the usual events that cause evaluation of the formula
  1260.  
  1261. POST 
  1262. Just as there are some calculation formulas which need to be 
  1263. performed repeatedly -- for these you will use AFTER -- so there 
  1264. are others which should only be performed once, when a record is 
  1265. saved. With POST, you can ensure that a result is only stored in 
  1266. a field (posted to another file) after the other calculations in 
  1267. the form have been carried out.
  1268.  
  1269. POST takes the syntax:
  1270.  
  1271.    POST [LET xxx =] expression
  1272.  
  1273. where xxx is a field name and the expression can be another 
  1274. field, a calculation, or a formula which calculates a result. The 
  1275. expression is not evaluated until the record is stored, unless 
  1276. the LET part of the formula is included. If this is the case, the 
  1277. expression is evaluated subject to the normal rules, but the 
  1278. assignment of LET is not made until the record is stored.
  1279.  
  1280. Take, for example, the formula:
  1281.  
  1282.    POST LET Cust_Balance.Customers = Cust_Balance.Customers +    
  1283.    Order_Amount.Orders
  1284.  
  1285. Order_Amount could represent the final figure in a series of 
  1286. calculations which work out the final value of an order. Clearly, 
  1287. we do not want the total to be stored in the Customers file until 
  1288. all the calculations have been performed. By preceding the 
  1289. formula with POST we can ensure that this condition is satisfied. 
  1290. However, intermediate results can be shown on the form by 
  1291. clicking in the calculation box to which this formula is 
  1292. attached.
  1293.  
  1294.  
  1295.  
  1296.                           MISCELLANEOUS
  1297.  
  1298. *   In some circumstances the Update option may skip some of the 
  1299.     records in the file it is updating. The problem occurs when 
  1300.     the update modifies a field which also forms part of the 
  1301.     update filter; for example, it would occur if the update 
  1302.     fields instruction was:
  1303.  
  1304.        Salary = Salary * 1.075
  1305.  
  1306.     and the update filter was:
  1307.  
  1308.        Salary >= L8000 
  1309.  
  1310.     The solution is to enclose the filter statement in 
  1311.     parentheses, as in:
  1312.  
  1313.        (Salary >= L8000)
  1314.  
  1315.     If you were running this example update under program 
  1316.     control, you would place the entire WHERE statement within 
  1317.     parentheses:
  1318.  
  1319.       (WHERE Salary >= L8000)
  1320.  
  1321.     This solution works by disabling the automatic optimization 
  1322.     which causes the problem.
  1323.  
  1324. *   If you try to print a line longer than the line length set in 
  1325.     Superbase's Printer options, Superbase will output a Carriage 
  1326.     Return followed by a Line Feed when it reaches the maximum 
  1327.     line length.
  1328.  
  1329. *   Note that Amiga owners can set a printer initialization 
  1330.     sequence from within Superbase's Set Options dialog. This 
  1331.     allows you to set the features and modes you prefer. The 
  1332.     sequence of control codes is sent to the printer each time 
  1333.     you perform a printing operation from within Superbase. If a 
  1334.     sequence is present Superbase does not send the `Skip over 
  1335.     perforation OFF' and `Set page length' codes that are 
  1336.     normally sent when the printer is accessed.
  1337.  
  1338. *   The output format parameters BF, UL, IT enable you to set 
  1339.     different print styles within a report or in the output from 
  1340.     a query. If you wish to set other printing features, you can 
  1341.     do so by using the CHR$ function to insert the appropriate 
  1342.     printer control codes. With a report which has been generated 
  1343.     in the Forms Editor, you will need to insert the control code 
  1344.     sequences in the report program. In a query, you can simply 
  1345.     enter them in the query fields line. For example, on some 
  1346.     Epson printers, the sequence 27, 14 selects enlarged print, 
  1347.     and the control code 20 turns it off. To output the data for 
  1348.     one field in enlarged print, your query Fields line might 
  1349.     look like this:
  1350.  
  1351.       Firstname, Lastname, CHR$(27);CHR$(14);City;CHR$(20), Street
  1352.  
  1353.     Note that some control codes may be inappropriately 
  1354.     interpreted by the printer device, in which case you should 
  1355.     set Print Raw on the Options requester to bypass the 
  1356.     interpretation.
  1357.  
  1358. *   Path names. Superbase accepts path names up to 40 characters 
  1359.     long (not including the file name).
  1360.  
  1361. *   File Names. Avoid using the characters : ? # / ; or the space 
  1362.     character. When using a file name as an argument to a command 
  1363.     such as OPEN FILE, it must always be inside quotation marks. 
  1364.     However, a file name used to extend a field name, e.g. 
  1365.     Name.Customers, need not be inside quotes, unless it includes 
  1366.     non-alphanumeric characters, i.e. other than a-Z and 0-9. 
  1367.     Superbase supplies quotes when necessary during dialog 
  1368.     selections, but if you type a command line in directly be 
  1369.     sure to observe this rule.
  1370.  
  1371. *   The Duplicate option on the Record menu re-initializes any 
  1372.     constant formulas. This means you can duplicate a record 
  1373.     which contains the constant formula SER without duplicating 
  1374.     its serial number. Similarly, if a file uses the constant 
  1375.     formula TODAY, creating a new record by duplicating an 
  1376.     existing record does not reproduce the original date.
  1377.  
  1378. *   Superbase and the Forms Editor require a large amount of chip 
  1379.     memory when printing a form in graphics mode. If your Amiga 
  1380.     only has 512K RAM, the graphics print option may not be 
  1381.     usable.
  1382.  
  1383. *   The DML LABELS examples on page 5-78 are wrong. Example 1 
  1384.     should not suggest that the command can extend over more than 
  1385.     one line; example 2 requires the keyword FILE after LABELS.
  1386.  
  1387. *   The normal New Line sequence on the Amiga is a CHR$(10) (line 
  1388.     feed). On most other machines and in Superbase, the default 
  1389.     New Line sequence is CHR$(13) CHR$(10) (carriage return, line 
  1390.     feed). The CHR$(13) may be suppressed, for example to achieve 
  1391.     compatibility with the ED editor, by setting RETURN=OFF in 
  1392.     the Tool Types list of the Superbase icon, which may be 
  1393.     modified using the Workbench Info option.
  1394.  
  1395. *   GET and WAIT (1). Control characters can be returned in GET 
  1396.     and WAIT statements. If these are saved in a file which is 
  1397.     subsequently LISTed, they will generate the "File contains 
  1398.     non-text characters" error. Note also that CONTROL-C, the 
  1399.     standard interrupt key, does not stop program execution if 
  1400.     returned in GET or WAIT. It is up to the program to detect 
  1401.     the value and act appropriately.
  1402.  
  1403. *   GET and WAIT (2). WAIT makes the window active before it 
  1404.     starts waiting for input, so if the window becomes inactive 
  1405.     for any reason you cannot reactivate it. If this is a problem 
  1406.     for your application, use GET instead; however, you will not 
  1407.     be able to input into any other window, such as a CLI window, 
  1408.     because GET continually reactivates the Superbase window.
  1409.  
  1410. *   The CLEAR statement must be placed last on a program line.
  1411.  
  1412. *   You may want to convert Superbase text files (`.sbt' files) 
  1413.     to ASCII files. The technique for doing this is:
  1414.  
  1415.      1. Rename the `.sbt' file, giving it a different extension. 
  1416.         E.g., rename `Merge.sbt' as `Merge.asc'.  
  1417.      
  1418.      2. Load the file into the Text Editor. Its name will not 
  1419.         appear in the list of files presented by the Project Open 
  1420.         dialog and you will have to type it into the dialog box 
  1421.         (remember to include the extension name).
  1422.  
  1423.      3. Delete the lines containing information about ruler 
  1424.         lengths. These will be blank lines except for two figures 
  1425.         which give the start and end points for the ruler that is 
  1426.         attached to the following paragraph.
  1427.  
  1428.      4. Save the file using the same name with which it was 
  1429.         loaded.
  1430.  
  1431.  
  1432.  
  1433.                       FORTHCOMING FEATURES
  1434.  
  1435. Future releases of Superbase Professional for the Amiga will 
  1436. include the following product enhancements:
  1437.  
  1438. *  Communications
  1439.  
  1440. *  Multi-line transaction handling on forms
  1441.  
  1442. *  Improved form printing
  1443.  
  1444. *  Data conversion utility
  1445.  
  1446. *  Additional programming commands
  1447.  
  1448. *  Further performance optimization
  1449.  
  1450. Certain features of Superbase Professional referred to in the 
  1451. manual have not been included in Version 2.00. These relate to 
  1452. the multi-line transaction handling capability, which requires 
  1453. formula syntax allowing SUM, for example, to be used in form 
  1454. calculations. The EDIT REPLICATE menu option in the Forms Editor 
  1455. will not be enabled until the full transaction handling version 
  1456. of Superbase is released.
  1457.     
  1458.  
  1459.  
  1460.  
  1461.  
  1462.  
  1463.  
  1464.  
  1465.  
  1466.  
  1467.  
  1468.  
  1469.  
  1470.  
  1471.  
  1472.  
  1473.  
  1474.  
  1475.  
  1476.  
  1477.  
  1478.  
  1479.  
  1480.  
  1481.  
  1482.  
  1483.  
  1484.  
  1485.